MyID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)
IP=$(cat conf/servers.conf | grep $MyID | awk {'print $2'})
N=$(cat conf/servers.conf | grep $MyID | awk {'print $3'})
PrisMWVersion=$(cat conf/servers.conf | grep $MyID | awk {'print $4'})
TileFile=$(cat conf/servers.conf | grep $MyID | awk {'print $5'})
SeedFile=$(cat conf/servers.conf | grep $MyID | awk {'print $6'})
OutFileEx=$(cat conf/servers.conf | grep $MyID | awk {'print $7'})
JobID=$(cat conf/servers.conf | grep $MyID | awk {'print $8'})

Date=$(date '+%Y-%m-%d-%H-%M-%S')

SeedFileModified=$(echo $SeedFile | tr '/' '_')
OutPutFileName="file-$SeedFileModified-date-$Date-num-$N-$OutFileEx"

echo $OutPutFileName
echo $PrisMWVersion $IP $N $TileFile $SeedFile $OutPutFileName $JobID

rm *.out
#javac -cp .:$PrisMWVersion src/tileStyle/*.java src/tileStyle/Prism/*.java src/tileStyle/Prism/events/*.java
#java -cp .:$PrisMWVersion tileStyle.TileStyleStarter server $IP $N $TileFile $SeedFile $OutPutFileName $JobID

java -jar Mahjong_quiet.jar server $IP $N $TileFile $SeedFile $OutPutFileName $JobID

